<template>
  <Switch v-model:checked="mValue" v-bind="{
    ...props.column?.componentProps,
    disabled: true
  }" />
</template>
<script setup lang="ts">
import { PropType, ref, watch } from 'vue';
import { MTableColumnType } from '../../Table/types';
import Switch from '../../Form/components/Switch.vue';
const props = defineProps({
  data: {
    // 当前行数据
    type: Object
  },
  column: {
    // 列定义
    type: Object as PropType<MTableColumnType>
  }
})
const mValue = ref(props.data?.text)
watch(()=>props.data?.text,()=>{
  mValue.value = props.data?.text
})
</script>
<style lang="less" scoped>

</style>